//
// Created by jinling on 2025/6/25.
//
#include "Logger.h"
using namespace tmms::base;

Logger::Logger(const FileLogPter& log) :log_(log)
{
}


void Logger::SetLogLevel(const LogLevel &level)
{
    level_ = level;
}


LogLevel Logger::GetLogLevel() const{
    return level_;
}

void Logger::Write(const std::string &msg){ //重写一下  输出到文件中去
        if (log_)
        {
            log_->WriteLog(msg);
        }else
        {
            std::cout<< msg << std::endl;
        }
}
